package xc.com.oss.io;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description TODO
 * @Author
 * @Date 2021/5/28 14:57
 **/
public class EqualsUtil {
    static Map<String, String> map = new HashMap<>();

    static {
        /* 图片类型 */
        map.put("jpg", "image/jpg/");
        map.put("png", "image/png/");
        map.put("jpeg", "image/jpeg/");
        map.put("icon", "image/icon/");
        map.put("bmp", "image/bmp/");
        map.put("gif", "image/gif/");
        map.put("svg", "image/svg/");

        /* 视频类型 */
        map.put("mp4", "video/mp4/");
        map.put("m4a", "video/m4a/");
        map.put("avi", "video/avi/");
        map.put("flv", "video/flv/");
        map.put("ts", "video/ts/");
        map.put("m3u8", "video/m3u8/");
        map.put("wmv", "video/wmv/");

        map.put("js", "js/");
        map.put("css", "css/");
    }

    public static String strExtension(String extension) {
        return map.get(extension);
    }
}
